package com.itlong.cloud.miniprogram.dao;

import com.itlong.cloud.POJO.PO.WelinkBindRelationPO;
import com.itlong.cloud.POJO.VO.miniprogram.WelinkUserVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * <desc>
 *      welink用户信息数据访问接口
 * </desc>
 *
 * @createDate 2020/03/19
 */
@Repository
public interface IWelinkUserDao {
    /**
     * <desc>
     *      welink登录
     * </desc>
     *
     * @param welinkUserId
     * @return
     * @author Jiaqi.X
     * @createDate 2020/03/19
     */
    WelinkUserVO login(@Param("welinkUserId") String welinkUserId);

    /**
     * <desc>
     *      检测手机号是否已绑定welink用户
     * </desc>
     *
     * @param phoneNum
     * @return
     * @author Jiaqi.X
     * @createDate 2020/03/19
     */
    String checkBindPhone(@Param("phoneNum") String phoneNum);

    /**
     * <desc>
     *      保存
     * </desc>
     *
     * @param params
     * @author Jiaqi.X
     * @createDate 2020/03/19
     */
    void save(Map<String,Object> params);

    /**
     * <desc>
     *      修改
     * </desc>
     *
     * @param params
     * @author Jiaqi.X
     * @createDate 2020/03/20
     */
    void update(Map<String,Object> params);

    /**
     * <desc>
     *      获取用户信息
     * </desc>
     *
     * @param userId
     * @return
     * @author Jiaqi.X
     * @createDate 2020/01/23
     */
    WelinkUserVO getUserInfo(@Param("userId") String userId);

    /**
     * <desc>
     *      修改
     * </desc>
     *
     * @author Jiaqi.X
     * @createDate 2020/03/20
     */
    void updatePhone(@Param("phone") String phone,@Param("welinkUserId") String welinkUserId);
}
